﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <link href="/css/style.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="/js/jquery-1.7.1.js"></script>
    <script type="text/javascript">
        var debug=<%debug %>;
    </script>
    <script type="text/javascript">
        $(document).ready(function () {
            $('#cbxTcpSend').attr('checked', debug.tcpClient.sendData);
            $('#cbxTcpRecv').attr('checked', debug.tcpClient.recvData);
            $('#cbxWebSend').attr('checked', debug.webSocket.sendData);
            $('#cbxWebRecv').attr('checked', debug.webSocket.recvData);
        });
        function saveDebug() {
            debug.tcpClient.sendData = $('#cbxTcpSend')[0].checked;
            debug.tcpClient.recvData = $('#cbxTcpRecv')[0].checked;
            debug.webSocket.sendData = $('#cbxWebSend')[0].checked;
            debug.webSocket.recvData = $('#cbxWebRecv')[0].checked;
            $.post('/home/config', { debug: JSON.stringify(debug)});
        }
    </script>
</head>
<body>
<div class="mainbox" style="width:600px;">
    <div class="rightbox">
    <input type="text" id="txt" value=""/>
    <input type="submit" id="btn_submit" class="input_send1" value="Submit"/>
    <input type="button" id="Submit1" class="input_send1" value="Save Config" onclick="saveDebug()"/>
    </div>
    <table id="tableList">
        <thead>
        </thead>
        <tbody>
        <tr>
        <td>Link</td><td><a href="/douban">douban</a></td><td><a href="/Socket">Socket</a></td>
        </tr>
        <tr>
            <td>TcpClinet</td><td><input type="checkbox" id="cbxTcpSend"/>Send Log</td><td><input type="checkbox" id="cbxTcpRecv"/>Recv Log</td>
        </tr>
        <tr>
            <td>WebSocket</td><td><input type="checkbox" id="cbxWebSend"/>Send Log</td><td><input type="checkbox" id="cbxWebRecv"/>Recv Log</td>
        </tr>
        </tbody>
    </table>
</div>
</body>
</html>